/*
 * @Author: bug巫师 184179023@.com
 * @Date: 2025-04-15 08:37:42
 * @LastEditors: bug巫师 184179023@.com
 * @LastEditTime: 2025-04-15 08:47:53
 * @FilePath: \ABS.OA\miniprogram\config\projects.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/**
 * Notes: 多项目系统配置
 * Date: 2025-04-11
 */

const projectSetting = require('../../../config/projects_config.js');

module.exports = {
  // 云函数环境ID - 使用cloudfunctions/mcloud/config/config.js中的ID
  CLOUD_ID: 'abitions-6gmak8fr92c59b33',
  
  // #### 多项目配置 ####
  // oa项目配置
  oa: {
    name: '研发管理',
    color: '#0066cc',
    icon: '/images/icons/oa.png',
    tabBar: [
      {
        pagePath: "projects/oa/pages/default/index/default_index",
        text: "工作台",
        iconPath: "/projects/oa/images/tabbar/home.png",
        selectedIconPath: "/projects/oa/images/tabbar/home_cur.png"
      },
      {
        pagePath: "projects/oa/pages/crm/index/crm_index",
        text: "CRM",
        iconPath: "/projects/oa/images/tabbar/crm.png",
        selectedIconPath: "/projects/oa/images/tabbar/crm_cur.png"
      },
      {
        pagePath: "projects/plm/pages/project/list/project_list",
        text: "项目",
        iconPath: "/projects/oa/images/tabbar/project.png",
        selectedIconPath: "/projects/oa/images/tabbar/project_cur.png"
      },
      {
        pagePath: "projects/oa/pages/task/index/task_index",
        text: "任务",
        iconPath: "/projects/oa/images/tabbar/task.png",
        selectedIconPath: "/projects/oa/images/tabbar/task_cur.png"
      },
      {
        pagePath: "projects/oa/pages/my/index/my_index",
        text: "我的",
        iconPath: "/projects/oa/images/tabbar/my.png",
        selectedIconPath: "/projects/oa/images/tabbar/my_cur.png"
      }
    ],
    
    // #### 项目级别系统参数 
    VER: 'build 2025.04.11',
    COMPANY: 'ABS',
    
    // 共享设置
    SETUP_SHARE_TITLE: 'ABS办公协作',
    
    // 图片大小限制
    IMG_UPLOAD_SIZE: 10, // 图片上传大小M兆  
    
    // 缓存相关
    CACHE_IS_LIST: true, // 列表是否缓存
    CACHE_LIST_TIME: 60 * 30, // 列表缓存时间秒
  
    // 公共设置
    PROJECT_COLOR: projectSetting.PROJECT_COLOR,
    NAV_COLOR: projectSetting.NAV_COLOR,
    NAV_BG: projectSetting.NAV_BG,
    
    // 用户设置
    USER_REG_CHECK: projectSetting.USER_REG_CHECK || false,
    USER_FIELDS: projectSetting.USER_FIELDS || [],
    
    // 通知与消息相关
    NEWS_NAME: projectSetting.NEWS_NAME || '通知公告',
    NEWS_CATE: projectSetting.NEWS_CATE || [],
    
    // 页面标题
    SETUP_CONTENT_ITEMS: projectSetting.SETUP_CONTENT_ITEMS || [],
    
    // 审批流程相关
    FLOW_NAME: projectSetting.FLOW_NAME || '审批',
    FLOW_ALL_STEPS: projectSetting.FLOW_ALL_STEPS || [],
    
    // 部门选项
    DEPT_OPTIONS: projectSetting.DEPT_OPTIONS || []
  },
  
  // CRM项目配置(预留)
  crm: {
    name: '客户关系管理',
    color: '#19be6b',
    icon: '/images/icons/crm.png',
    tabBar: [
      {
        pagePath: "projects/crm/pages/default/index/default_index",
        text: "工作台",
        iconPath: "/projects/crm/images/tabbar/home.png",
        selectedIconPath: "/projects/crm/images/tabbar/home_cur.png"
      },
      {
        pagePath: "projects/crm/pages/customer/index/customer_index",
        text: "客户",
        iconPath: "/projects/crm/images/tabbar/customer.png",
        selectedIconPath: "/projects/crm/images/tabbar/customer_cur.png"
      },
      {
        pagePath: "projects/crm/pages/contact/index/contact_index",
        text: "联系人",
        iconPath: "/projects/crm/images/tabbar/contact.png",
        selectedIconPath: "/projects/crm/images/tabbar/contact_cur.png"
      },
      {
        pagePath: "projects/crm/pages/opportunity/index/opportunity_index",
        text: "商机",
        iconPath: "/projects/crm/images/tabbar/opportunity.png",
        selectedIconPath: "/projects/crm/images/tabbar/opportunity_cur.png"
      },
      {
        pagePath: "projects/crm/pages/my/index/my_index",
        text: "我的",
        iconPath: "/projects/crm/images/tabbar/my.png",
        selectedIconPath: "/projects/crm/images/tabbar/my_cur.png"
      }
    ]
  },
  
  // PLM项目配置
  plm: {
    name: '产品生命周期管理',
    color: '#1890ff',
    icon: '/images/icons/plm/plm_icon.png',
    tabBar: [
      {
        pagePath: "projects/plm/pages/default/index/default_index",
        text: "工作台",
        iconPath: "/projects/plm/images/tabbar/home.png",
        selectedIconPath: "/projects/plm/images/tabbar/home_cur.png"
      },
      {
        pagePath: "projects/plm/pages/project/list/project_list",
        text: "项目",
        iconPath: "/projects/plm/images/tabbar/project.png",
        selectedIconPath: "/projects/plm/images/tabbar/project_cur.png"
      },
      {
        pagePath: "projects/plm/pages/role/simulator/role_simulator",
        text: "角色模拟",
        iconPath: "/projects/plm/images/tabbar/role.png",
        selectedIconPath: "/projects/plm/images/tabbar/role_cur.png"
      }
    ],
    
    // #### 项目级别系统参数 
    VER: 'build 2025.04.17',
    COMPANY: 'ABS',
    
    // 共享设置
    SETUP_SHARE_TITLE: 'ABS产品生命周期管理',
    
    // 图片大小限制
    IMG_UPLOAD_SIZE: 10, // 图片上传大小M兆  
    
    // 缓存相关
    CACHE_IS_LIST: true, // 列表是否缓存
    CACHE_LIST_TIME: 60 * 30, // 列表缓存时间秒
  
    // 公共设置
    PROJECT_COLOR: projectSetting.PROJECT_COLOR,
    NAV_COLOR: projectSetting.NAV_COLOR,
    NAV_BG: projectSetting.NAV_BG,
    
    // 用户设置
    USER_REG_CHECK: projectSetting.USER_REG_CHECK || false,
    USER_FIELDS: projectSetting.USER_FIELDS || [],
    
    // 通知与消息相关
    NEWS_NAME: projectSetting.NEWS_NAME || '通知公告',
    NEWS_CATE: projectSetting.NEWS_CATE || [],
    
    // 页面标题
    SETUP_CONTENT_ITEMS: projectSetting.SETUP_CONTENT_ITEMS || [],
    
    // 审批流程相关
    FLOW_NAME: projectSetting.FLOW_NAME || '审批',
    FLOW_ALL_STEPS: projectSetting.FLOW_ALL_STEPS || [],
    
    // 部门选项
    DEPT_OPTIONS: projectSetting.DEPT_OPTIONS || []
  }
};
